
#BEGIN alias
# alias dell='ssh -p 2001 eagle@sh.eagle711.win'
# alias ikev2='ssh -p 2002 eagle@sh.eagle711.win'
# alias google='ssh -p 2000 root@g.eagle711.win'
# alias google2='ssh -p 2000 root@g2.eagle711.win'
# alias dsm='ssh -p 2001 root@sh.eagle711.win'
# alias c7='ssh -p 2004 eagle@sh.eagle711.win'
# alias 101='ssh -p 7010 eagle@aliyun.eagle711.win'
# alias 102='ssh -p 7020 eagle@aliyun.eagle711.win'


#original rm
alias orm='/bin/rm'
alias cl='clear'
alias prettyjson='python -m json.tool'
#TODO hard coded
# alias sm="source $SHELLRC_ROOT/shellrc"
# if command -v vim >/dev/null 2>&1;then
#     alias vi='vim'
# fi

# alias pushall='git remote | xargs -L1 -t -IR git push R'
# alias fetchall='git remote | xargs -L1 -t -IR git fetch R'

if command -v proxychains >/dev/null 2>&1;then
    alias pc='proxychains'
elif command -v proxychains4 >/dev/null 2>&1;then
    alias pc='proxychains4'
elif command -v proxychains5 >/dev/null 2>&1;then
    alias pc='proxychains5'
fi

case $(uname) in
    "Linux")
        alias lA='ls -aF --color=auto'
        alias la='ls -AF --color=auto'
        alias ll='ls -lF --color=auto'
        alias l='ls -F --color=auto'
        alias ls='ls -F --color=auto'
        ;;
    "Darwin")
        alias lA='ls -aFG'
        alias la='ls -AFG'
        alias ll='ls -lFG'
        #alias l='ls -FG'
        #alias ls='ls -FG'
        alias l='ls -G'
        alias ls='ls -G'
        #brew with local proxy
        # alias brewlp='echo "Using socks5 proxy: ALL_PROXY=socks5://localhost:1080"&&ALL_PROXY=socks5://localhost:1080 brew'
        # export PATH=/usr/local/Cellar/privoxy/3.0.26/sbin:$PATH
        ;;
esac
alias cd..='cd ..'
alias cd-='cd -'
alias grep='grep --color=auto'
alias cdapp="cd ${LOCAL_APP_ROOT}"

if command -v emacs >/dev/null 2>&1;then
    alias emacs='emacs -nw'
fi

# if command -v vim >/dev/null 2>&1;then
#     alias vi='vim'
# fi

# if command -v nvim >/dev/null 2>&1;then
#     alias vim='nvim'
# fi

if command -v free >/dev/null 2>&1;then
    if command -v pacman >/dev/null 2>&1;then
        alias free='free -hw'
    else
        alias free='free -h'
    fi
fi

if command -v proxychains >/dev/null 2>&1;then
    alias pc='proxychains'
elif command -v proxychains4 >/dev/null 2>&1;then
    alias pc='proxychains4'
fi

alias tree='tree -I node_modules'
alias tree2='tree -L 2 -I node_modules'
alias tree3='tree -L 3 -I node_modules'

# alias npm='npm --registry=https://registry.npm.taobao.org'

# alias yarn='yarn --registry=https://registry.npm.taobao.org'

#用法:在echo中使用$(RED)some-text-to-be-color-red$(CLEAR)
# alias RED='tput setaf 1'
# alias CLEAR='tput sgr0'

alias aliyun='ssh -p 2000 eagle@aliyun.eagle711.win'
#END alias
# vim: set ft=sh:
